package com.guigu.tms.security.service.impl;

import cn.hutool.core.util.RandomUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.guigu.tms.commons.security.entity.AuthUser;
import com.guigu.tms.security.mapper.AuthUserMapper;
import com.guigu.tms.security.service.IDriverService;
import com.guigu.tms.security.service.SendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

import java.time.Duration;

@Service
public class DriverServiceImpl implements IDriverService {

    @Autowired
    SendService sendService;

    @Autowired
    AuthUserMapper authUserMapper;

    @Override
    public AuthUser Login(String mobile, String code) {
        QueryWrapper<AuthUser> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("mobile",mobile);
        return authUserMapper.selectOne(queryWrapper);
    }
}
